package com.course.coursedesign2022.controller;

import com.course.coursedesign2022.pojo.UserInfo;
import com.course.coursedesign2022.service.ExtendDemand;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ExtendDemandController {

    @Autowired
    private ExtendDemand extendDemand;

    @PutMapping(value = "/user/level/{id}")
    public String levelAss(@PathVariable Integer id){
        return extendDemand.GetLevel(id);
    }

    @PutMapping(value = "/user/updateExScore/{id}")
    public UserInfo updateExchangeScore(@PathVariable Integer id){
        return extendDemand.UpdateExchangeScore(id);
    }
}
